package com.huatai.range.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.huatai.range.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author luoxc
 * @since 2023-03-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_trial_info")
@ApiModel(value="TbTrialInfo对象", description="")
public class TbTrialInfoEntity extends BaseEntity {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "试验id")
    private String trialId;

    @ApiModelProperty(value = "项目名称", required = true)
    @NotBlank(message = "项目名称不能为空！")
	private String trialName;

	@ApiModelProperty(value = "试验类型", required = true)
	@NotBlank(message = "试验类型不能为空！")
	private String trialType;

    @ApiModelProperty(value = "任务书号", required = true)
    @NotBlank(message = "任务书号不能为空！")
	private String taskNumber;

    @ApiModelProperty(value = "试验日期", required = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime trialTime;

    @ApiModelProperty(value = "状态")
	private String state = "1";

	@ApiModelProperty(value = "试验状态（0等待试验、1试验中、2试验完成）")
	private String trialState;

	@ApiModelProperty(value = "备注")
	private String remark;
}
